#ifndef BASEGAMEENTITY_H
#define BASEGAMEENTITY_H
#include <cassert>

class BaseGameEntity
{

	//Master Class, it all stems from this.

private:

	int iID;						//Unique to each derived character, used to identify them.	
	static int siNextID;			//Updated each time BaseGameEntity is instantiated
	void SetID(int value);			//Must be called in constructor to make sure all is properly set.

public:

	BaseGameEntity(int iID)			//Instantiates with a valid ID
	{SetID(iID);}

	virtual ~BaseGameEntity(){} 	//Deconstructor
	virtual void Update()=0;		//Virtual function, different for each character
	int ID()const{return iID;}		//Returns ID for specific character
};




int BaseGameEntity::siNextID = 0;
//HERE'S THE SET ID STUFF
void BaseGameEntity::SetID(int val)
{

	assert ( (val >= siNextID) && "<BaseGameEntity::SetID>: invalid ID"); 
	//make sure the val is equal to or greater than the next available ID

	iID = val;
	siNextID = iID + 1;
}


#endif
